﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.IO;

public partial class Pages_Home : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string directory = Server.MapPath("~/Admin/Upload/imageslide");
            ArrayList arr = new ArrayList();
            if (Directory.Exists(directory))
            {
                foreach (string item in Directory.GetFiles(directory))
                {
                    string[] strSplit = item.Split('\\');
                    arr.Add(new ImageList(strSplit[strSplit.Length - 1].ToString()));
                }
            }
            Repeater1.DataSource = arr;
            Repeater1.DataBind();
        }
    }
}
